namespace Billing.DataObjects
{
    using System;
    using System.Text;


    public partial class ShellDataContext
    {
        partial void InsertUser(User instance)
        {
            instance.Password = new CryptoUtils().GetMD5(instance.Password);
            this.ExecuteDynamicInsert(instance);
        }
    }

    public partial class DLL : Billing.IBaseObject
    {
        public override string ToString()
        {
            return _FullName;
        }
        #region IBaseObject Members

        public object Value
        {
            get
            {
                throw new System.NotImplementedException();
            }
            set
            {

                throw new System.NotImplementedException();
            }
        }

        public object CurrentObject
        {
            get { return this; }
        }

        #endregion
    }

    public partial class GetRightChildsResult : INodeObject
    {

        #region INodeObject Members
        Guid? INodeObject.ParentTypeGUID
        {
            get
            {
                return this._PtGUID;
            }
            set
            {
                this._PtGUID = value;
            }
        }

        Guid? INodeObject.ParentGUID
        {
            get
            {
                return this._PGUID;
            }
            set
            {
                this._PGUID = value;
            }
        }

        Guid? INodeObject.ChildTypeGUID
        {
            get
            {
                return this._ChtGUID;
            }
            set
            {
                this._ChtGUID = value;
            }
        }

        Guid? INodeObject.ChildGUID
        {
            get
            {
                return this._ChGUID as Guid?;
            }
            set
            {
                if (value == null)
                    value = Guid.Empty;
                this._ChGUID = (Guid)value;
            }
        }

        string INodeObject.Name
        {
            get
            {
                return this._NAME;
            }
            set
            {
                this._NAME = value;
            }
        }

        int INodeObject.Type
        {
            get
            {
                return this.Type;
            }
            set
            {
                this.Type = value;
            }
        }
        #endregion
    }

    public partial class GetTreeResult : INodeObject
    {

        //#region INodeObject Members

        //public System.Guid? ParentTypeGUID
        //{
        //    get
        //    {
        //        return this._ptGUID;
        //    }
        //    set
        //    {
        //        this._ptGUID = value;
        //    }
        //}

        //public System.Guid? ParentGUID
        //{
        //    get
        //    {
        //        return this._pGUID;
        //    }
        //    set
        //    {
        //        this._pGUID = value;
        //    }
        //}

        //public System.Guid? ChildTypeGUID
        //{
        //    get
        //    {
        //        return this._ctGUID;
        //    }
        //    set
        //    {
        //        this._ctGUID = value;
        //    }
        //}

        //public System.Guid? ChildGUID
        //{
        //    get
        //    {
        //        return this._cGUID;
        //    }
        //    set
        //    {
        //        this._cGUID = value;
        //    }
        //}

        //public string Name
        //{
        //    get
        //    {
        //        return this._NAME;
        //    }
        //    set
        //    {
        //        this._NAME = value;
        //    }
        //}

        //public int Type
        //{
        //    get
        //    {
        //        return (int)this._PLevel;
        //    }
        //    set
        //    {
        //        this._PLevel = value;
        //    }
        //}

        //#endregion

        #region INodeObject Members
        Guid? INodeObject.ParentTypeGUID
        {
            get
            {
                return this._ptGUID;
            }
            set
            {
                this._ptGUID = value;
            }
        }

        Guid? INodeObject.ParentGUID
        {
            get
            {
                return this._pGUID;
            }
            set
            {
                this._pGUID = value;
            }
        }

        Guid? INodeObject.ChildTypeGUID
        {
            get
            {
                return this._ctGUID;
            }
            set
            {
                this._ctGUID = value;
            }
        }

        Guid? INodeObject.ChildGUID
        {
            get
            {
                return this._cGUID;
            }
            set
            {
                this._cGUID = value;
            }
        }

        string INodeObject.Name
        {
            get
            {
                return this._NAME;
            }
            set
            {
                this._NAME = value;
            }
        }

        int INodeObject.Type
        {
            get
            {
                return (int)this._PLevel;
            }
            set
            {
                this._PLevel = value;
            }
        }
        #endregion
    }
}
